package com.atguigu.mvc.controller;

import jdk.nashorn.internal.runtime.logging.Logger;
import org.apache.commons.logging.Log;
import org.springframework.core.log.LogAccessor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 温笙
 * @date 2021/10/24
 */
@Controller
@RequestMapping("/test")
@Logger
public class RequestController {

    @RequestMapping(
            value = {"/param"},
            params = {"username"}
    )
    public String success(){
        return "success";
    }

    @RequestMapping({"/a*a/test","/getUser/{id}"})
    public String ant(@PathVariable("id") String id){
        System.out.println("id=============="+id);
        return "success";
    }
}
